<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"  
                xmlns:h="http://java.sun.com/jsf/html"  
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:c="http://java.sun.com/jstl/core"
                template="./../templates/StaffTemplate.xhtml">

    <h:head>

        <title>Create Announcement | </title>

    </h:head>
    <ui:define name="logout">
        <p:commandLink id="logoutLink" actionListener="#{staffLogoutManagedBean.doLogout}" value="#{bundle['login.logout.label']}" ajax="false" immediate="true" />
    </ui:define>

    <ui:define name="nav_menu">
        <p:menubar model="#{createAnnouncementManagedBean.staffMenuModel}"/>
    </ui:define>


    <ui:define name="content">
        <f:view beforePhase="#{createAnnouncementManagedBean.initView}">


            <h:body>

                <p:messages id="statusMessages" redisplay="false" />
                <p:panel header="Annoucement Details" style="width:100%;">   



                    <h:panelGrid columns="2" cellspacing="2" cellpadding="9">

                        <h:outputText value="Subject" style="font-weight: bold" />
                        <p:inputText value="#{createAnnouncementManagedBean.message.subject}" style="width:410px;" />
                    </h:panelGrid>

                    <p:separator/>
                    <h:panelGrid columns="1" cellspacing="2" cellpadding="9">    

                        <p:editor value="#{createAnnouncementManagedBean.message.message}" />

                        <p:commandButton value="Send" actionListener="#{createAnnouncementManagedBean.createAnnouncement}" ajax="true" style="float: right;" />


                    </h:panelGrid>

                </p:panel>
                <p:ajaxStatus>  
                    <f:facet name="start">  
                        <h:graphicImage value="../design/ajaxloading.gif" />  
                    </f:facet>  

                    <f:facet name="complete">  
                        <h:outputText value="" />  
                    </f:facet>  
                </p:ajaxStatus> 





            </h:body>


        </f:view>
    </ui:define>
</ui:composition>
